package com.campus_information_portal.dao;

import com.campus_information_portal.entity.*;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.Date;
import java.util.List;

/**
 * @Author:20155887赵开兰
 * @Description:
 * @Date: Created in 2018/4/26 9:04
 */
public interface PartyDao {


    /**
     * @param party_organization_num
     * @Description 根据党支部编号party_organization_num查询党支部信息
     * @author 20155883 万珊
     * @methodName queryPartyByPartyOrganizationNum
     * @returnType Party
     * @create 2018/4/26 8:45
     **/
    @Select("select * from party  where party_organization_num=#{party_organization_num}")
    Party queryPartyByPartyOrganizationNum(@Param("party_organization_num") int party_organization_num);

    /**
     * @Description 查询党支部名称
     * @author 20155883 万珊
     * @methodName queryPartyName
     * @returnType List
     * @create 2018/4/26 8:45
     **/
    @Select("select party_name from party")
    List<String> queryPartyName();

    /**
     * @param party_organization_num
     * @Description 根据党支部编号party_organization_num查询党支部名称
     * @author 20155883 万珊
     * @methodName queryPartyNameByPartyOrganizationNum
     * @returnType String
     * @create 2018/4/26 8:45
     **/
    @Select("select party_name from party  where party_organization_num=#{party_organization_num}")
    String queryPartyNameByPartyOrganizationNum(@Param("party_organization_num") int party_organization_num);
}
